<template>
    <div class="user">
        <div class="nav">
            <div class="navTop">
                <router-link to="/user/meituanLogin" class="link"><span>美团账号登录</span></router-link>
                <router-link to="/user/phoneLogin" class="link"><span>手机验证登录</span></router-link>
            </div>
            <div id="solid" class="left"></div>
        </div>

        <web-info/>
        <router-view/>
    </div>
</template>

<script>
    import WebInfo from '@/components/webInfo/webInfo.vue'
    export default {
        components: {
          WebInfo
        },
        created() {
            let token = sessionStorage.getItem(sessionStorage.key('token'))
            console.log(token)
            if (token === null) {
                return
            }
            else if (token.length >= 0) {
                this.$router.push("/home/userInfo")
            }
        },
        methods: {
            back() {
                this.$router.push("/")
            }
        },
        mounted(){
            $('.navBar').css({ "z-index": 0 })
        }
    }
</script>

<style scoped lang="scss">
    .router-link-exact-active{
        color: red;
        position: relative;
        border-bottom: .08rem solid #FFC300;
        z-index: 2;
    }
    .user {
        position: fixed;
        top: 50px;
        background-color: #fff;
        width: 100%;
        .back {
            position: fixed;
            /*top: 0px;*/
            top: .22rem;
            left: 0.16rem;
            z-index: 33000;
            span {
                font-size: 0.48rem;
            }
            color: black;
        }
        .nav {
            .navTop {
                text-align: center;
                display: flex;
                padding-left: .2rem;
                padding-right: .2rem;
                /*position: relative;*/
                /*border-bottom: .08rem solid #d6d6d6;*/
                height: 0.86rem;
                line-height: 0.86rem;
                top: 50px;
                .link {
                    flex: 1;
                    text-align: center;
                    span {
                        font-size: 0.28rem;
                        font-weight: bold;
                        color: #222222;
                    }
                }
            }
            #solid {
                width: 100%;
                border-bottom: .08rem solid #d6d6d6;
                position: relative;
                bottom: 0.08rem;
                z-index: 1;
            }
        }
    }
</style>